class BankAccount:

    # 初始化
    def __init__(self, account_number, account_holder, balance):
        self.account_number = account_number
        self.account_holder = account_holder
        self.balance = balance

    # 存款
    def deposit(self, money):
        self.balance += money

    # 取款
    def withdraw(self, money):
        if money <= self.balance:
            self.balance -= money
            return 1
        return 0

    # 转账
    def transfer(self, to_ID, money):
        if self.balance < money:
            return 0
        else:
            self.balance -= money
            to_ID.balance += money
            return 1

    # 查询余额
    def get_balance(self):
        return self.balance

    # 显示信息
    def display_info(self):
            print(f'卡号：{self.account_number}，用户：{self.account_holder}，余额为{self.balance}')
